Skip to content

feat(webapp): add region override to the bulk replay action#4022

Open
matt-aitken wants to merge 2 commits into
mainfrom
feature/bulk-replay-region
Open

feat(webapp): add region override to the bulk replay action#4022
matt-aitken wants to merge 2 commits into
mainfrom
feature/bulk-replay-region

Conversation

@matt-aitken

Copy link
Copy Markdown
Member

Summary

When replaying runs in bulk from a deployed environment, you can now choose which region the replayed runs run in. The bulk action inspector shows an "Override region" dropdown that defaults to "Don't override", which keeps each run in its original region, so replaying a selection that spans multiple regions doesn't silently re-route anything. Pick a region and every matched run is replayed there instead.

The dropdown only appears for the replay action in a deployed environment with more than one region available; cancel actions and development environments don't show it.

Design

The selected region is carried through the bulk action as a dedicated replayRegion param, kept separate from the run-list selection filters so it can't be confused with a region selection filter. When the action runs, each replay passes it through to the existing region override on the replay service, which already falls back to each run's original region when no override is set. "Don't override" is a sentinel value that the action normalizes away so the service only ever sees a real region or nothing.

@changeset-bot

changeset-bot Bot commented Jun 22, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 23cab0b

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@coderabbitai

coderabbitai Bot commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: b38fc7fa-4c12-4336-93fe-4d278344ab59

📥 Commits

Reviewing files that changed from the base of the PR and between a8fb134 and 23cab0b.

📒 Files selected for processing (1)
  • apps/webapp/app/routes/resources.orgs.$organizationSlug.projects.$projectParam.env.$envParam.runs.bulkaction.tsx
🚧 Files skipped from review as they are similar to previous changes (1)
  • apps/webapp/app/routes/resources.orgs.$organizationSlug.projects.$projectParam.env.$envParam.runs.bulkaction.tsx
📜 Recent review details
⏰ Context from checks skipped due to timeout. (12)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (9, 10)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (1, 10)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (8, 10)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (7, 10)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (10, 10)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (2, 10)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (6, 10)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (5, 10)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (3, 10)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (4, 10)
  • GitHub Check: typecheck / typecheck
  • GitHub Check: e2e-webapp / 🧪 E2E Tests: Webapp

Walkthrough

The pull request adds an optional "Override region" feature to bulk replay actions. BulkActionService.create now computes a replayRegion from the incoming payload and persists it within the params object stored in the database. BulkActionService.process reads this value back and passes it as the region argument to ReplayTaskRunService. On the route side, the loader fetches available regions via RegionsPresenter in parallel with the existing presenter, the CreateBulkActionPayload schema gains an optional region field, and the action normalizes the replay sentinel to undefined before calling the service. The UI conditionally renders a region dropdown when the selected action is replay, the environment is not DEVELOPMENT, and more than one region exists.

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description covers summary and design, but it omits required template sections like issue link, checklist, testing, changelog, and screenshots. Add the Closes # line and fill in the checklist, Testing, Changelog, and Screenshots sections per the repository template.
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly describes the main change: adding a region override to bulk replay actions.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/bulk-replay-region

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

ESLint install failed: private package registry requires authentication. Disable ESLint in CodeRabbit settings or use public packages.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

devin-ai-integration[bot]

This comment was marked as resolved.

coderabbitai[bot]

This comment was marked as resolved.

@matt-aitken matt-aitken force-pushed the feature/bulk-replay-region branch from cbfa6fa to d74adf4 Compare June 23, 2026 01:55
@pkg-pr-new

pkg-pr-new Bot commented Jun 23, 2026

Copy link
Copy Markdown

Open in StackBlitz

@trigger.dev/build

npm i https://pkg.pr.new/@trigger.dev/build@a8fb134

trigger.dev

npm i https://pkg.pr.new/trigger.dev@a8fb134

@trigger.dev/core

npm i https://pkg.pr.new/@trigger.dev/core@a8fb134

@trigger.dev/python

npm i https://pkg.pr.new/@trigger.dev/python@a8fb134

@trigger.dev/react-hooks

npm i https://pkg.pr.new/@trigger.dev/react-hooks@a8fb134

@trigger.dev/redis-worker

npm i https://pkg.pr.new/@trigger.dev/redis-worker@a8fb134

@trigger.dev/rsc

npm i https://pkg.pr.new/@trigger.dev/rsc@a8fb134

@trigger.dev/schema-to-json

npm i https://pkg.pr.new/@trigger.dev/schema-to-json@a8fb134

@trigger.dev/sdk

npm i https://pkg.pr.new/@trigger.dev/sdk@a8fb134

commit: a8fb134

devin-ai-integration[bot]

This comment was marked as resolved.

@matt-aitken matt-aitken force-pushed the feature/bulk-replay-region branch from d74adf4 to cbfa6fa Compare June 23, 2026 11:51
@matt-aitken matt-aitken changed the base branch from main to prod June 23, 2026 11:57
@matt-aitken matt-aitken deleted the branch main June 23, 2026 11:59
@matt-aitken matt-aitken reopened this Jun 23, 2026
@matt-aitken matt-aitken changed the base branch from prod to prod-954ee5c June 23, 2026 12:00
devin-ai-integration[bot]

This comment was marked as resolved.

@matt-aitken matt-aitken force-pushed the feature/bulk-replay-region branch from cbfa6fa to 17990e0 Compare June 23, 2026 12:07
When replaying runs in bulk from a deployed environment, you can now choose
which region the replayed runs run in. The inspector shows an "Override
region" dropdown that defaults to "Don't override", which keeps each run in
its original region, so replaying a selection that spans multiple regions
doesn't silently re-route anything. Pick a region and every matched run is
replayed there instead.
@ericallam ericallam force-pushed the feature/bulk-replay-region branch from 17990e0 to a8fb134 Compare June 24, 2026 15:06
@ericallam ericallam changed the base branch from prod-954ee5c to main June 24, 2026 15:06
@ericallam ericallam marked this pull request as draft June 24, 2026 15:06
@github-actions

Copy link
Copy Markdown
Contributor

🧭 Helm Chart Prerelease Published

Version: 4.5.0-rc.7-pr4022.a8fb134

Install:

helm upgrade --install trigger \
  oci://ghcr.io/triggerdotdev/charts/trigger \
  --version "4.5.0-rc.7-pr4022.a8fb134"

⚠️ This is a prerelease for testing. Do not use in production.

devin-ai-integration[bot]

This comment was marked as resolved.

@ericallam ericallam marked this pull request as ready for review June 24, 2026 18:05
…n loader

Wrap RegionsPresenter.call() with tryCatch so a failure (e.g. missing
defaultWorkerInstanceGroupId feature flag on self-hosted) falls back to
an empty regions array instead of breaking the entire bulk-action
inspector — including the cancel flow which has no dependency on regions.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants